package com.vidyu.businesslayer.businessentities;

import com.vidyu.businesslayer.businesscomponents.Constants;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: eyalsa
 * Date: 3/31/13
 * Time: 7:47 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "skills")
@NamedQueries({
        @NamedQuery(
                name = "getSkillDesc",
                query = "FROM com.vidyu.businesslayer.businessentities.Skill as skill WHERE  skill.title = ?"
        )})
public class Skill implements Serializable {
    private static final long serialVersionUID = 3277073386101729397L;
    private long id = Constants.NON_VALID_ID;
    private String title;
    private String skillDesc;

    public Skill() {}

    public Skill(String title, String skillDesc) {
        this.title = title;
        this.skillDesc = skillDesc;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "skill_id", nullable = false, length = 11)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSkillDesc() {
        return skillDesc;
    }

    public void setSkillDesc(String skillDesc) {
        this.skillDesc = skillDesc;
    }
}
